package c.xc.c2

object mix01 {

  def main(args: Array[String]): Unit = {
    val oracle = new Oracle10 with DB
    oracle.insert
    println("mysql------------------")
    val mysql = new Mysql with DB with Nosql
    mysql.insert
    mysql.getKey
  }
}

trait DB {
  def insert: Unit = {
    println("添加数据...")
  }
}

trait Nosql {
  def getKey: Unit = {
    println("拿到缓存数据")
  }
}

class Oracle10 {

}

abstract class Mysql {

}
